package work;

import java.util.Scanner;

/*
11 输入20个  0-9之间的数 若干个, 统计出每个数输了多少次
 */
public class Work11 {
    static int[] array = new int[10];
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入20个0-9之间的数字：");

        for (int i = 0; i < 20; i++) {
            int number = scanner.nextInt();
        }

        for (int i = 0; i < array.length; i++) {
            System.out.println(i+"出现了"+array[i]+"次");
        }
    }
    static void counts(int number){
        array[number]++;

    }
}
